package com.learn.springboot.controller.page;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author suzheng
 * @date 2024-05-16
 **/
@Controller
public class PageController {

    @GetMapping("/login/main")
    public String loginPage(Model model) {
        return "login";
    }

    @GetMapping("/order/deal")
    public String orderDealPage(Model model) {
        return "main";
    }

    @GetMapping("/")
    public String index(Model model) {
        model.addAttribute("message", "Welcome to Thymeleaf with Spring Boot!");
        return "index";
    }
}